/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By 深圳中科鑫智科技有限公司
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.commons.domain.userAuth;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 用户实名认证表
 * </p>
 *
 * @since 2025-08-07
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@TableName("cere_user_realname_auth")
@ApiModel(value = "UserRealnameAuth", description = "用户实名认证表")
@AllArgsConstructor
@Builder
public class UserRealnameAuth {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @ApiModelProperty(value = "主键ID")
    @NotNull(message = "主键ID不能为空")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    @NotNull(message = "用户ID不能为空")
    @TableField("user_id")
    private Long userId;


    /**
     * 真实姓名
     */
    @ApiModelProperty(value = "真实姓名")
    @NotEmpty(message = "真实姓名不能为空")
    @Length(max = 50, message = "真实姓名长度不能超过50")
    @TableField(value = "real_name", condition = LIKE)
    private String realName;


    /**
     * 证件类型：1身份证，2护照，3港澳通行证
     */
    @ApiModelProperty(value = "证件类型：1身份证，2护照，3港澳通行证")
    @NotNull(message = "证件类型：1身份证，2护照，3港澳通行证不能为空")
    @TableField("id_card_type")
    private Integer idCardType;


    /**
     * 证件号码
     */
    @ApiModelProperty(value = "证件号码")
    @NotEmpty(message = "证件号码不能为空")
    @Length(max = 50, message = "证件号码长度不能超过50")
    @TableField(value = "id_card_number", condition = LIKE)
    private String idCardNumber;


    /**
     * 证件正面照片URL
     */
    @ApiModelProperty(value = "证件正面照片URL")

    @TableField("id_card_front")
    private String idCardFront;


    /**
     * 证件背面照片URL
     */
    @ApiModelProperty(value = "证件背面照片URL")

    @TableField("id_card_back")
    private String idCardBack;


    /**
     * 人脸照片
     */
    @ApiModelProperty(value = "人脸照片")

    @TableField("id_card_handheld")
    private String idCardHandheld;


    /**
     * 认证状态：0未认证，1审核中，2已认证，3认证失败
     */
    @ApiModelProperty(value = "认证状态：0未认证，1审核中，2已认证，3认证失败")
    @NotNull(message = "认证状态：0未认证，1审核中，2已认证，3认证失败 不能为空")
    @TableField("auth_status")
    private Integer authStatus;


    /**
     * 认证时间
     */
    @ApiModelProperty(value = "认证时间")
    @TableField("auth_time")
    private LocalDateTime authTime;


    /**
     * 认证失败原因
     */
    @ApiModelProperty(value = "认证失败原因")
    @Length(max = 255, message = "认证失败原因长度不能超过255")
    @TableField(value = "auth_fail_reason", condition = LIKE)
    private String authFailReason;


    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @NotNull(message = "创建时间不能为空")
    @TableField("create_time")
    private LocalDateTime createTime;


    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @NotNull(message = "更新时间不能为空")
    @TableField("update_time")
    private LocalDateTime updateTime;


    /**
     * 请求数据
     */
    @ApiModelProperty(value = "请求数据")
    @Length(max = 65535, message = "请求数据长度不能超过65535")
    @TableField("request_data")
    private String requestData;


    /**
     * 响应数据
     */
    @ApiModelProperty(value = "响应数据")
    @Length(max = 65535, message = "响应数据长度不能超过65535")
    @TableField("response_data")
    private String responseData;


    /**
     * 状态码
     */
    @ApiModelProperty(value = "状态码")
    @Length(max = 20, message = "状态码长度不能超过20")
    @TableField(value = "status_code", condition = LIKE)
    private String statusCode;


}
